package proxyserver

import "iotall/iotcore/entity"

type ICreateProxy interface {
	NewServer(m *entity.CommPort) IProxyServer
}

var (
	mp map[string]ICreateProxy
)

func init() {
	mp = make(map[string]ICreateProxy, 0)
}
func AddCreateProxy(mode string, proxy ICreateProxy) {
	mp[mode] = proxy
}
func GetCreateProxy(mode string) ICreateProxy {
	var v, ok = mp[mode]
	if ok {
		return v
	}
	return nil
}
